<?php
Yii::import('zii.widgets.CListView');
class Page extends CListView {
	
	public function renderPager() {
		if (! $this->enablePagination)
			return;
		$pager = array ();
		$class = 'CLinkPager';
		if (is_string ( $this->pager ))
			$class = $this->pager;
		else if (is_array ( $this->pager )) {
			$pager = $this->pager;
			if (isset ( $pager ['class'] )) {
				$class = $pager ['class'];
				unset ( $pager ['class'] );
			}
		}
		$pager ['pages'] = $this->dataProvider->getPagination ();
		
		if ($pager ['pages']->getPageCount () > 1) {
			echo '<tr class="' . $this->pagerCssClass . '">';
			echo '<td colspan=10 align=right>';
			$this->widget ( $class, $pager );
			echo "</td>";
			echo '</tr>';
		} else
			$this->widget ( $class, $pager );
	}

}
?>